﻿<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/common/topBegin.jsp"%>
<link rel="stylesheet" type="text/css" href="${ctx}/js/public/Validform/css/Validform.css"/>
<link rel="stylesheet" type="text/css" href="${ctx}/js/public/Validform/css/right_yz.css"/>
 <script type="text/javascript" src="${ctx}/js/jquery-1.7.1.min.js"></script>
 <script language="JavaScript" type="text/javascript" src="${ctx}/js/public/Validform/Validform_v5.3.2.js"></script>
 <script language="JavaScript" type="text/javascript" src="${ctx}/js/public/Validform/right_Validform_v5.3.2_config.js"></script>
 <script type="text/javascript" src="${ctx}/js/extjs/ext-base.js"></script>
<script type="text/javascript" src="${ctx}/js/extjs/ext-all.js"></script>
<script type="text/javascript" src="${ctx}/js/extjs/ui/ext-ui.js"></script>
<script type="text/javascript" src="${ctx}/js/public/console.js"></script>
<script type="text/javascript" src="${ctx}/js/extjs/ux/Toast.js"></script>
<script type="text/javascript" src="${ctx}/js/ajaxfileupload.js"></script>
<script>
var cfg = {cxt:'${ctx}'};
<c:if test="${not empty entity}">
	<c:set var="url" value="emergency/update.action"/>
</c:if>
<c:if test="${ empty entity}">
<c:set var="url" value="emergency/add.action"/>
</c:if>
</script>
</head>
<body>
<div  id="table_form_div" class="table_form1">
<form  action="${ctx}/${url}" method="post" id="formobj" enctype="multipart/form-data">
 <input type="hidden" id="subBtn"   />
 <input type="hidden" id="backTip"  value="操作成功" />
  <table class="table-form" width="100%">
   <tbody>
      <tr>
	       <td width="15%" class="table-th">应急预案编号<font color="red">*</font></td>
	       <td class="table-td" width="35%">
	           <input type="text" id="emergency_id"  class="input-text" style="width:95%;" name="emergencyId" value="${entity.emergencyId}" maxlength="32"   datatype="*" />
	       </td>
	       <td width="15%" class="table-th">应急预案名称<font color="red">*</font></td>
	       <td class="table-td" width="35%">
	           <input type="text" id="emergency_name"  class="input-text" style="width:95%;" name="emergencyName" value="${entity.emergencyName}" maxlength="64"   datatype="*" />
	       </td>
	  </tr>
	  <tr>
	  	   <td width="15%" class="table-th">危险品名称<font color="red">*</font></td>
	       <td class="table-td" width="35%">
	           <input type="text" id="danger_goods_name"  class="input-text" style="width:95%;" name="dangerGoodsName" value="${entity.dangerGoodsName}" maxlength="64"   datatype="*" />
	       </td>
	       <td width="15%" class="table-th">危险品类型<font color="red">*</font></td>
	       <td class="table-td" width="35%">
	       		<select id="danger_level" name="dangerLevel" style="width:250px;" datatype="*">
	       			<option value="1" <c:if test="${entity.dangerLevel eq 1 }">selected</c:if>>一类危险品</option>
	       			<option value="2" <c:if test="${entity.dangerLevel eq 2 }">selected</c:if>>二类危险品</option>
	       			<option value="3" <c:if test="${entity.dangerLevel eq 3 }">selected</c:if>>三类危险品</option>
	       			<option value="4" <c:if test="${entity.dangerLevel eq 4 }">selected</c:if>>四类危险品</option>
	       			<option value="5" <c:if test="${entity.dangerLevel eq 5 }">selected</c:if>>五类危险品</option>
	       		</select>
	       </td>
	  </tr>
	   <tr>
	       <td width="15%" class="table-th">预案日期<font color="red">*</font></td>
           <td class="table-td" colspan="3">
				<span id="sp_emergencyTime" ></span>
                <input type="hidden"   id="hid_emergencyTime" value="${entity.emergencyTime}"/>           		
           </td>
           
      </tr>
      <tr>
           <td  width="15%" class="table-th">应急预案方案<font color="red">*</font></td>
		   <td class="table-td" colspan="3">
	           <textArea id="emergency_plan"  class="textarea" style="width:98%;" cols="75" rows="3" name="emergencyPlan"  maxlength="100"   datatype="*" >${entity.emergencyPlan }</textArea>
	       </td>          
      </tr>
      <tr>
            <td  width="10%" class="table-th">
		  	<input type="button" id="btn_upload" value="上传附件" onclick="emergencyForm.openAttachWin();"/>
		  </td>
         <td colspan="5"><div id="attach_div">
         	<c:if test="${not empty entity.attachName}">
         		<c:set var="files" value="${fn:split(entity.attachName,',')}"/>
         		<c:forEach var="item" items="${files }">
         			<c:set var="itemFile" value="${fn:substring(item,(fn:indexOf(item,'/')+1),fn:length(item))}"/>
         			<c:set var="preItemFile" value="${fn:substring(itemFile,0,fn:indexOf(itemFile,'.')) }"/>
        			<span id="sp_${preItemFile}" style="padding-left:8px;padding-right:5px;">${itemFile }</span>
        			<a id="a_${preItemFile}" href="javascript:void(0);" onclick="emergencyForm.delFile('${itemFile}');">删除</a>
        			<input type="hidden" id="hid_${preItemFile}" value="${item }"/>
         		</c:forEach>
         	</c:if>
         </div>
        </td>     
      </tr>
	 </tbody>
  </table>
   <input type="hidden" id="id"  name="id" value="${entity.id}" />
   <input type="file"  id="attachFile" name="file" style="display:none" />
   <input type="hidden" id="hid_filePath" name="attachName" value="${entity.attachName }"/>
  </form>
  </div>
  <script type="text/javascript" src="${ctx}/js/app-web/biz/emergency/emergencyForm.js"></script>
  </body>
  </html>
  